﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITAP.Core.Modelling.Primitives;

namespace ITAP.ContourBuilder.Components.Dimensions
{
    [Serializable]
    public class ArcRadiusDimension : ContourElementDimension
    {
        public override string DimensionText
        {
            get
            {
                string radius = "";
                if (this.Element.Height != 0)
                    radius = (this.Element.Primitive as Circle).Radius.ToString("0.0");
                else
                    radius = "∞";

                if (this.PrefixSymbol != string.Empty)
                    return this.PrefixSymbol + " = " + radius;
                else
                    return radius;

            }
        }
    }
}
